package com.example.ws_test;

import androidx.fragment.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class FirstFragment extends Fragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        //  Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_first, container, false);
        
        // 设置Fragment内容
        TextView textView = view.findViewById(R.id.fragment1_text);
        textView.setText("这是第一个Fragment页面");
        
        return view;
    }
}